﻿@page "/setting"

@layout EmptyLayout
@inject NavigationManager NavigationManager
@inject StorageService StorageService
@inject IPopupService PopupService

<MCard Class="slide-in-left" MaxWidth="@("100%")" Width="@("100%")" Height="@("100%")">
    <MToolbar Color="cyan"
              Height="@("55px")"
              Dark>
        <MButton Icon OnClick="OnReturn">
            <MIcon>
                mdi-arrow-left
            </MIcon>
        </MButton>
        <MToolbarTitle>
            系统设置
        </MToolbarTitle>

        <MSpacer></MSpacer>
        <MButton Depressed OnClick="OnSave">
            保存
        </MButton>
    </MToolbar>

    <br />

    <MTextField @bind-Value="SettingDto.max_tokens"
                Label="最大Tokens"
                Outlined
                Clearable>
    </MTextField>

    <br />
    <MSlider @bind-Value="SettingDto.temperature"
             Label="温度"
             ThumbColor="red"
             Max="1"
             Step="0.1"
             Ticks="true"
             Min="0"
             ThumbLabel="@("always")"></MSlider>
    <br />
    <MSlider @bind-Value="SettingDto.MaxAbove"
             Label="最大关联上文"
             ThumbColor="red"
             Max="20"
             Step="1"
             Ticks="true"
             Min="1"
             ThumbLabel="@("always")"></MSlider>

</MCard>
